package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author lmshe
 * @since 2018-07-12
 */
@TableName("w_documents")
public class Documents extends Model<Documents> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 文档格式
     */
	private String format;
    /**
     * 真实类型
     */
	@TableField("real_format")
	private String realFormat;
    /**
     * 类别
     */
	@TableField("category_id")
	private Integer categoryId;
    /**
     * 子类别
     */
	@TableField("category_child_id")
	private Integer categoryChildId;
    /**
     * 文档名称
     */
	@TableField("document_name")
	private String documentName;
    /**
     * 简介
     */
	private String desc;
    /**
     * 文档封面图
     */
	private String image;
    /**
     * 阅读数
     */
	@TableField("read_num")
	private Long readNum;
    /**
     * 下载量
     */
	@TableField("download_num")
	private Long downloadNum;
    /**
     * 0为不上架，1为上架
     */
	@TableField("is_online")
	private Integer isOnline;
    /**
     * 上传者
     */
	private String operator;
    /**
     * 收费类型，0免费文档，1会员免费，，2会员优惠
     */
	@TableField("price_type")
	private Integer priceType;
    /**
     * 普通价格
     */
	@TableField("normal_price")
	private BigDecimal normalPrice;
    /**
     * 会员价格
     */
	@TableField("member_price")
	private BigDecimal memberPrice;
    /**
     * 下载地址
     */
	@TableField("download_url")
	private String downloadUrl;
    /**
     * 0表示分页内容为文本，1表示分页内容为图片
     */
	private Integer type;
    /**
     * 标签
     */
	private String tag;
	private Date createtime;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getRealFormat() {
		return realFormat;
	}

	public void setRealFormat(String realFormat) {
		this.realFormat = realFormat;
	}

	public Integer getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

	public Integer getCategoryChildId() {
		return categoryChildId;
	}

	public void setCategoryChildId(Integer categoryChildId) {
		this.categoryChildId = categoryChildId;
	}

	public String getDocumentName() {
		return documentName;
	}

	public void setDocumentName(String documentName) {
		this.documentName = documentName;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public Long getReadNum() {
		return readNum;
	}

	public void setReadNum(Long readNum) {
		this.readNum = readNum;
	}

	public Long getDownloadNum() {
		return downloadNum;
	}

	public void setDownloadNum(Long downloadNum) {
		this.downloadNum = downloadNum;
	}

	public Integer getIsOnline() {
		return isOnline;
	}

	public void setIsOnline(Integer isOnline) {
		this.isOnline = isOnline;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public Integer getPriceType() {
		return priceType;
	}

	public void setPriceType(Integer priceType) {
		this.priceType = priceType;
	}

	public BigDecimal getNormalPrice() {
		return normalPrice;
	}

	public void setNormalPrice(BigDecimal normalPrice) {
		this.normalPrice = normalPrice;
	}

	public BigDecimal getMemberPrice() {
		return memberPrice;
	}

	public void setMemberPrice(BigDecimal memberPrice) {
		this.memberPrice = memberPrice;
	}

	public String getDownloadUrl() {
		return downloadUrl;
	}

	public void setDownloadUrl(String downloadUrl) {
		this.downloadUrl = downloadUrl;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Documents{" +
			"id=" + id +
			", format=" + format +
			", realFormat=" + realFormat +
			", categoryId=" + categoryId +
			", categoryChildId=" + categoryChildId +
			", documentName=" + documentName +
			", desc=" + desc +
			", image=" + image +
			", readNum=" + readNum +
			", downloadNum=" + downloadNum +
			", isOnline=" + isOnline +
			", operator=" + operator +
			", priceType=" + priceType +
			", normalPrice=" + normalPrice +
			", memberPrice=" + memberPrice +
			", downloadUrl=" + downloadUrl +
			", type=" + type +
			", tag=" + tag +
			", createtime=" + createtime +
			"}";
	}
}
